#ifndef __SYSMANAGE_H__
#define __SYSMANAGE_H__
#include"appconfig.h"

#define SYS_EVT_WAKEUP (0x01<<0)
#define SYS_EVT_VBATLOW (0X01<<1)
#define SYS_EVT_VBATFULL (0X01<<2)

#define DEV_INIT_SAVE_FLAGE   0XAA
typedef struct 
{
	rt_uint8_t url[32];//服务器url
	rt_uint16_t port;//端口
	rt_uint8_t mac[12];
	rt_uint8_t vbat;//剩余电量
	rt_int8_t csq;//信号值
	rt_uint32_t flow;//使用了多少kB流量
}devInfodef;

void eeprom_load_data(rt_uint8_t *data);
void eeprom_save_data(rt_uint8_t *data);
void devinfo_default(rt_uint8_t *ip,rt_uint16_t port,rt_uint8_t *id);
devInfodef* devinfo_get(void);

rt_device_t eeprom_device_open(void);
void eeprom_device_close(rt_device_t dev);

#endif
